#! /bin/bash

if [ $# -ne 1 ]
then
    echo "usage: $0 boot_img_name"
    exit
fi

boot_img=$1

set -x 

split_bootimg.pl  $boot_img

mkdir ramdisk && cd ramdisk

gzip -dc ../$boot_img-ramdisk.gz | cpio -i

echo -e "splite $boot_img done, just modify files and run root_stage1.sh\n"

set -
exit 0
